<div class="container">
  <form class="form-signin" method="post" [formGroup]="validateForm" ngxsForm="system.userLoginForm"
        [ngxsFormClearOnDestroy]="true" (ngSubmit)="submitForm()">
    <h2 class="form-signin-heading" style="text-align: center">请登录</h2>
    <p>
      <label for="username" class="sr-only">用户名</label>
      <input type="text" id="username" name="username" class="form-control" placeholder="用户名" required
             autofocus="" formControlName="username">
    </p>
    <p>
      <label for="password" class="sr-only">密码</label>
      <input type="password" id="password" name="password" class="form-control" placeholder="密码"
             required formControlName="password">
    </p>
    <button class="btn btn-lg btn-primary btn-block" type="submit"
            [disabled]="!validateForm.dirty || validateForm.invalid">登录
    </button>
    <p class="tooltip">
      <a routerLink="/forget">忘记密码？</a>
      <a class="register" routerLink="/register">注册</a>
    </p>
  </form>
</div>
